package com.jinzhi.jzweb.service;

import com.jinzhi.common.base.CoreService;
import com.jinzhi.common.utils.Result;
import com.jinzhi.jzweb.domain.TrackDrawDO;
import com.jinzhi.jzweb.pojo.TrackDrawName4;
import com.jinzhi.jzweb.pojo.TrackDrawNameVO;
import com.jinzhi.jzweb.pojo.XinJiangTrackVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 
 * <pre>
 * 赛道抽签表（存储抽签信息）
 * </pre>
 * <small> 2024-02-28 09:32:18 | lance</small>
 */
public interface TrackDrawService extends CoreService<TrackDrawDO> {
    /**
     * 抽签接口
     * @param trackDrawDTO
     * @return
     */
    public Result<List<TrackDrawDO>> trackDrawList(TrackDrawDO trackDrawDTO);

    /**
     * 抽签接口-抽取理论考试选手
     * @param trackDrawDTO
     * @return
     */
    public Result<List<TrackDrawDO>> trackDrawList1(TrackDrawDO trackDrawDTO);


    public Result<List<TrackDrawDO>> trackDrawList(TrackDrawDO trackDrawDTO,Integer type);

    /**
     * 每个参赛院校两个人 一个选手在1-50号 另一个选手在 51-100号
     * @param trackDrawDTO
     * @param i
     * @return
     */
    Result<List<XinJiangTrackVO>> trackDrawList2(TrackDrawDO trackDrawDTO, int i);

    /**
     * 查询上次抽签结果-20251020新疆
     * @param trackDrawDTO
     * @return
     */
    Result<List<XinJiangTrackVO>> trackList2(TrackDrawDO trackDrawDTO);

    /**
     * 查询上次抽签结果
     * @param trackDrawDTO
     * @return
     */
    public Result<List<TrackDrawDO>> trackList(TrackDrawDO trackDrawDTO);
    public Result<List<TrackDrawDO>> trackList1(TrackDrawDO trackDrawDTO);

    /**
     *
     *  处理抽签结果数据，改成4*18格式
     * @param trackDrawDOS
     * @return
     */
    List<TrackDrawDO> setTemplate(List<TrackDrawDO> trackDrawDOS);

    /**
     * 导入抽签参赛院校
     * @param file
     * @return
     */
    Result<Object> importExcelTrackDraw(MultipartFile file,Long cbatchId);

    /**
     * 导入抽签抽取理论考试人员
     * @param file
     * @param cbatchId
     * @return
     */
    Result<TrackDrawName4> importExcelTrackDraw1(MultipartFile file, Long cbatchId);

    /**
     * 开始抽签
     * @param trackDrawDTO
     * @return
     */
    Result<List<TrackDrawDO>> startDraw(TrackDrawDO trackDrawDTO);


    /**
     * 导出抽签结果
     * @param trackDrawDTO
     * @return
     */
    void exportDraw(HttpServletResponse response, TrackDrawDO trackDrawDTO);

    /**
     * 查询列表
     * @param trackDrawDTO
     * @return
     */
    List<TrackDrawDO> exportDrawList( TrackDrawDO trackDrawDTO);


    /**
     * 导入选手信息
     * @param file
     * @param cbatchId
     * @return
     */
    Result<Object> importExcelTrackDrawXinJiang(MultipartFile file, Long cbatchId);
}
